<?php
// +----------------------------------------------------------------------
// | OneKeyAdmin [ Believe that you can do better ]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://onekeyadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: MUKE <513038996@qq.com>
// +----------------------------------------------------------------------
namespace app\api\validate;

use think\Validate;

class Order extends Validate
{
    protected $rule = [
        "stop_id" => "require|number",
        "day" => "require|number",
        'channel'=>"require|number",
        'coupon_id'=>"require|number",
        'mobile'       => 'require|regex:/^1[3-9]\d{9}$/',
        'car_id'       => 'require',
    ];
    protected $message = [
        'mobile.require'        => '请填写手机号',
        'mobile.regex'        => '手机号格式不正确',

    ];
    protected $scene = [
        "init"   => ["stop_id",'day'],
        "create"   => ["stop_id",'day','channel','mobile','car_id'],
    ];
}